package com.sky.mapper;

import com.sky.entity.SetmealDish;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {


    /**
     * 根据菜品id查询套餐id
     * @param dishIds
     * @return
     */
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /**
     * 添加套餐菜品信息
     * @param dishes
     */
    void insertBatch(List<SetmealDish> dishes);

    /**
     * 根据setmealIds批量删除套餐菜品信息
     * @param setmealIds
     */
    void deleteBatchBySetmealId(List<Long> setmealIds);

    /**
     * 根据setmealId查询套餐菜品信息
     * @param setmealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}" )
    List<SetmealDish> getBySetmealId(Long setmealId);
}
